<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">

        <title>猜数字游戏</title>

        <style>
            html {
                font-family: sans-serif
            }

            body {
                width: 50%;
                max-width: 800px;
                min-width: 480px;
                margin: 0 auto
            }

            .lastResult {
                color: white;
                padding: 3px
            }
        </style>

        <!--  ERROR:Uncaught TypeError: Cannot read property 'addEventListener' of null  -->
        <!--  <script src="number_guessing_game.js"></script> -->
        <!--        <script src="number_guessing_game.js" async></script>-->
        <script src="number_guessing_game_refactor.js" async></script>
    </head>

    <body>
        <h1>猜数字游戏</h1>

        <p>我刚才随机选定了一个100以内的自然数。看你能否在 10 次以内猜中它。每次我都会告诉你所猜的结果是高了还是低了。</p>

        <div class="form">
            <label for="guessField">请猜数: </label>
            <input type="text" id="guessField" class="guessField">
            <input type="submit" value="确定" class="guessSubmit">
        </div>

        <div class="resultParas">
            <p class="guesses"/>
            <p class="lastResult"/>
            <p class="lowOrHi"/>
        </div>

        <script>
            // 开始编写 JavaScript 代码
        </script>
    </body>
</html>